<%@ page contentType="text/html;charset=UTF-8"%>
<%@ include file="/WEB-INF/views/include/taglib.jsp"%>
<html>
<head>
<meta name="decorator" content="sysDefault"
	content="text/html; charset=utf-8" />
<link
	href="${staticPath}/lib/datetimepicker/0.0.11/css/bootstrap-datetimepicker.min.css"
	rel="stylesheet" type="text/css">
<link href="${staticPath}/lib/chosen/1.1.0/chosen.min.css"
	rel="stylesheet" type="text/css">
<link rel="stylesheet"
	href="${staticPath}/lib/ztree/3.5/css/zTreeStyle/zTreeStyle.css"
	type="text/css">
<script src="${staticPath}/lib/ztree/3.5/js/jquery.ztree.all-3.5.js"
	type="text/javascript"></script>
<script src="${staticPath}/js/jquery-dialog.js" type="text/javascript"></script>
<script type="text/javascript">
	$(document).ready(
			function() {
				var opt = {
					service : "selectOneShopService",
					idField : "shopId",
					nameField : "shopName",
					title : "门店选择对话框"
				};
				$("#shopDialog").Dialog(opt);
				//城市选择对话框
				var opt1 = {
					service : "selectCityDataService",
					idField : "cityCode",
					nameField : "cityName",
					title : "城市选择对话框"
				};
				$("#cityDialog").Dialog(opt1);
				$("#floorForm")
						.validate(
								{
									submitHandler : function(form) {
										//Oosp_Loading('正在提交，请稍等...');
										form.submit();
									},
									errorContainer : "#messageBox",
									errorPlacement : function(error, element) {
										$("#messageBox").text("输入有误，请先更正。");
										if (element.is(":checkbox")
												|| element.is(":radio")
												|| element.parent().is(
														".input-append")) {
											error.appendTo(element.parent()
													.parent());
										} else {
											error.insertAfter(element);
										}
									}
								});
			})
</script>
</head>
<body>
	<div class="container-fluid">
		<div class="row">
			<div class="col-xs-12">
				<div class="panel panel-default">
					<div class="panel-heading">
						<h3 class="panel-title">
							修改楼层数据 <a class="btn btn-default btn-sm pull-right" role="button"
								href="javascript:void(0)" onclick="history.go(-1)">返回</a>
						</h3>
					</div>
					<div class="panel-body">
						<div class="col-xs-10">
							<form:form id="floorForm" modelAttribute="sysBaseFloor"
								action="${contextPath}/sys/base/floor/saveUpdateFloor"
								method="post" class="form-horizontal" role="form">
								<form:hidden path="id" />
								<div class="form-group">
									<div class="col-sm-6">
										<label for="code" class="col-sm-4 control-label">楼层编码:</label>
										<div class="col-sm-8">
											<form:hidden path="code" />
											<form:input id="code" path="code" htmlEscape="false"
												class="form-control" disabled="true" />
										</div>
									</div>

									<div class="col-sm-6">
										<label for="name" class="col-sm-4 control-label">楼层名称</label>
										<div class="col-sm-8">
											<form:input id="name" path="name" htmlEscape="false"
												class="form-control" />
										</div>
									</div>
								</div>
								<div class="form-group">
									<div class="col-sm-6">
										<label for="level" class="col-sm-4 control-label">所属城市:</label>
										<div class="col-sm-6">
											<div class="input-group">
												<form:hidden path="cityCode" id="cityCode" />
												<input type="text" class="form-control required"
													id="cityName" readonly="readonly" value="${cityName}">
												<span class="input-group-btn">
													<button class="btn btn-primary" id="cityDialog"
														type="button">选择</button>
												</span>
											</div>
										</div>
									</div>

									<div class="col-sm-6">
										<label for="name" class="col-sm-4 control-label">经营面积:</label>
										<div class="col-sm-8">
											<form:input id="areaSquar" path="areaSquar"
												htmlEscape="false" class="form-control" />
										</div>
									</div>
								</div>
								<div class="form-group">
									<div class="col-sm-6">
										<label for="level" class="col-sm-4 control-label">所属门店::</label>
										<div class="col-sm-6">
											<div class="input-group">
												<form:hidden path="parent"  />
												<input type="text" class="form-control required"
													id="shopName" readonly="readonly" value="${shopName}">
												<span class="input-group-btn">
													<button class="btn btn-primary" id="shopDialog"
														type="button">选择</button>
												</span>
											</div>
										</div>
									</div>
								</div>
								<div class="form-group">
									<div class="col-sm-offset-6 col-sm-10">
										<input class="btn btn-primary" type="submit" value="保 存" />
									</div>
								</div>
							</form:form>
						</div>
					</div>
				</div>
			</div>
		</div>
	</div>
</body>
</html>